<head>
@extends('layouts.admin_common')
@section('content')
<!-- SSLの場合 -->
@if(app('env')=='production')
<link rel="stylesheet" href="{{ secure_asset('/css/sale.css') }}">
<script src="{{ secure_asset('/js/set.js') }}"></script>
@else
<!-- SSLではない場合 -->
<link rel="stylesheet" href="{{ asset('/css/sale.css') }}">
<script src="{{ asset('/js/set.js') }}"></script>
@endif

<script>
$(document).ready(function() {
	$("#goodCodeId").quickTip("../setjson",{},function(){
	});
});
</script>
</head>

<div class="breadcrumbs_container">
    {{Breadcrumbs::render('admin.set') }}
</div>
<div class="system_tab_line"></div>
<script src="{{ asset('laydate/laydate.js') }}"></script>
<script>

laydate.render({
	  elem: '#start_date'
	  ,lang: 'en'
	  ,type: 'datetime'
	});
laydate.render({
	  elem: '#end_date'
	  ,lang: 'en'
	  ,type: 'datetime'
	});
</script>


<div id="outDiv">
<form class="form-inline" id="setForm" method="post" enctype="multipart/form-data">
			<table class="table table-condensed">
				<tr>
				    <td>セット名称</td>
					<td>期間FROM</td>
					<td>期間TO</td>
					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				</tr>
				<tr>
				@foreach ($allInfo[1] as $setMasterInfo)
				<tr>
				    <td>{{$setMasterInfo->set_name}}</td>
					<td>{{$setMasterInfo->start_date}}</td>
					<td>{{$setMasterInfo->end_date}}</td>
					<td><input type="button" value="修正"
						class="btn btn-primary button_normal"
						onclick="gotoEdit('{{$setMasterInfo->set_id}}')"/>
						<input type="button" value="削除" class="btn btn-primary button_normal"
						onclick="onSubmitDelete('delete','{{$setMasterInfo->set_id}}')" /></td>
				</tr>
				@endforeach
			</table>
			<table border="0" cellspacing="0" style="width: 1300px;">
				<tr>
					<td align="right" style="width: 725px;"><input type="button" value="新規"
						class="pure-button pure-button-primary button_normal"
						onclick="onSubmitAddSet()" /></td>
					<td align="right" style="width: 50px;"><input type="button" value="@lang('messages.cancel')"
						class="pure-button pure-button-primary button_normal"
						onclick="cancelSet()" /></td>
					<td align="right" style="width: 50px;"><input type="button" value="戻る"
						class="pure-button pure-button-primary button_normal"
						onclick="onSubmitGo()" /></td>
                </tr>
			</table>
			<div>@if(isset($success)) {{$success}} @endif</div>
		    <div>@if(isset($error)) {{$error}} @endif</div>
			<input type="hidden" id="goods_id" name="goods_id">
			<input type="hidden" id="category_id" name="category_id">
			<input type="hidden" id="str" name="str" value="100">
			<input type="hidden" id="set_id" name="set_id" value="">
			<input type="hidden" name="_token" value="{{csrf_token()}}">
</form>

</div>
@endsection
